﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.IO;

namespace SHA_1Hash
{
    class SHA_1Hash
    {
        static void Main(string[] args)
        {
            char Separator = Path.DirectorySeparatorChar;
            string InputFileName = ".." + Separator + ".." + Separator + "file.bin";
            SHA1 sha1 = SHA1.Create();
            Stream reader = File.Open(InputFileName, FileMode.Open);
            using (reader)
            {
                byte[] allBytes = sha1.ComputeHash(reader);
                foreach (byte eachByte in allBytes)
                {
                    Console.Write((char)eachByte);
                }
                Console.WriteLine();
            }
        }
    }
}
